/*
*   Copyright Spectra, Inc. All Rights Reserved.
*/
package spectra.ee.web.product.model;

import spectra.base.BasePublic;
import spectra.base.util.StringUtil;

public class ProductCompare
{
	private String product1;
    
	private String product2;
    
	private String product3;
    
	private String product4;
    
	private String product5;

	public ProductCompare()
	{
		super();
	}
	
	public ProductCompare(String productIds)
	{
		super();
		if(productIds != null)
        {
			String[] productIdList = new String[5];
			productIdList = StringUtil.split(productIds, BasePublic.COLUMN_SEPARATOR);
            int iProductIdList = productIdList.length;
            
      		if(iProductIdList > 0)
      		{
      			this.product1 = productIdList[0];
      			if(iProductIdList > 1)
      			{
      				this.product2 = productIdList[1];
      				if(iProductIdList > 2)
      				{
      					this.product3 = productIdList[2];
      					if(iProductIdList > 3)
      					{
      						this.product4 = productIdList[3];
      						if(iProductIdList > 4)
      						{
      							this.product5 = productIdList[4];
      						}
      					}
      				}
      			}
      		}
        }
	}

	public String getProduct1() {
		return product1;
	}

	public void setProduct1(String product1) {
		this.product1 = product1;
	}

	public String getProduct2() {
		return product2;
	}

	public void setProduct2(String product2) {
		this.product2 = product2;
	}

	public String getProduct3() {
		return product3;
	}

	public void setProduct3(String product3) {
		this.product3 = product3;
	}

	public String getProduct4() {
		return product4;
	}

	public void setProduct4(String product4) {
		this.product4 = product4;
	}

	public String getProduct5() {
		return product5;
	}

	public void setProduct5(String product5) {
		this.product5 = product5;
	}
}